<?php

namespace app\user\model;

use think\Model;
use think\Request;
use app\common\model\BaseModel;

/**
* @property int $user_money_id 
* @property int $user_id 对应user表
* @property string $total_money 累计消费
* @property string $balance 可用余额
* @property string $lock_balance 锁定余额
* @property int $points 账号积分
* @property int $lock_points 锁定积分
*/
class UserMoney extends BaseModel
{
    // 表名
    protected $table = 'user_money';
    protected $pk = 'user_money_id';
    const primaryKey = 'user_money_id';

    // 追加属性
    protected $append = [

    ];

    public static function __make(Request $request)
    {
        return (new self())->find($request->param(self::primaryKey));
    }
}
